package com.java.utils;

import java.io.File;

public class Test {
    public static void main(String[] args) throws Exception{
       /* File file = new File("D:\\WorkSpeace\\Idea2021Yeas\\faceplusplus-demo\\src\\main\\resources\\static\\01.jpg");  //你的本地图片路径
        byte[] buff = HTTPUtils.getBytesFromFile(file);
        String url = "https://api-cn.faceplusplus.com/facepp/v3/detect";
        HashMap<String, String> map = new HashMap<>();
        HashMap<String, byte[]> byteMap = new HashMap<>();
        map.put("api_key", "At4UhWzwV9C_a_oDPSLrNjD0Fj3ADicK");
        map.put("api_secret", "wpMov1GM876AS4QIy6Xfapn9J1Da6EKh");
        //   map.put("return_landmark", "1");
        //   map.put("return_attributes", "gender,age,smiling,headpose,facequality,blur,eyestatus,emotion,ethnicity,beauty,mouthstatus,eyegaze,skinstatus");
        byteMap.put("image_file", buff);
        try{
            byte[] bacd = post(url, map, byteMap);
            String str = new String(bacd);
            System.out.println(str);
        }catch (Exception e) {
            e.printStackTrace();
        }*/

       String detect = FaceUtils.detect(new File("D:\\WorkSpeace\\Idea2021Yeas\\safety_community\\cs-login\\src\\main\\resources\\static\\03.jpg"));
      //  boolean b = FaceUtils.CreateFaceSet();
      //  boolean b = FaceUtils.addFaceSet(detect);
         boolean face = FaceUtils.SearchFace(detect);
        System.out.println(face);
       // String s = FaceTest.CreateFaceSet();
       // System.out.println(s);
    }
}
